package org.jeecg.test;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.text.SimpleDateFormat;

@Slf4j
public class DemoTest1 {

    @Test
    public void Test1() {
        String inputDate = "19-一月-2024";
        String[] parts = inputDate.split("-");
        int day = Integer.parseInt(parts[0]);
        String monthStr = parts[1];
        int year = Integer.parseInt(parts[2]);

        SimpleDateFormat sdf = new SimpleDateFormat("MM");
        int month = Integer.parseInt(sdf.format(year + "-" + monthStr + "-01"));
        System.out.println(
                year+"-"+month+"-"+day
        );
    }
}
